<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="/WEB-INF/dream.tld" prefix="dream"%>
        <% String ctx = request.getContextPath();
   request.setAttribute("ctx", ctx);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>石家庄联动通信科技有限公司-产品常见问题</title>
<meta content="产品常见问题" name="description" />
<meta content="产品常见问题" name="keywords" />
<meta content="all" name="robots" />
<link href="${ctx}/css/skin/style/style.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/css/skin/style/common.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="${ctx}/js/common.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript"> 
 function addHits(id){
      $.ajax ({      
        url:"${ctx}/proQues.do?method=addHits&id="+id,
        type:"get",
       // date:"method=updateHitsCount&adinfoId="+infoId,
        dateType:"text",
        success:function (t){
        }
      }
      )
    }
</script>
<script type="text/javascript">
	function getPro() {
		var pId = document.getElementById("pId");
		pId.length = 0;
		$.ajax( {
			url : "${ctx}/proInfo.do?method=findProByClass",
			type : "post",
			data : "flag=" + $("#cId").val(),
			dataType : "json",
			success : function(t) { //判断回调函数		
				$.each(t, function(i) {
					var opt = document.createElement("option");
					opt.text = t[i].proModel;
					opt.value = t[i].pId;
					pId.options.add(opt, 0);
				});
			}
		})
	}
</script>
</head>
<body>
		<div class="crumbs">首页 &gt; 常见问题 &gt;</div>
		<div class="page">
	<form id="form" action="${ctx}/proQues.do?method=findByClasPId" method="post">
	<table  width="701" height="50" border="0" cellpadding="0" cellspacing="0">
		<tr>
                <td width="50%" height="24" align="right">搜索问题：</td>
                <td width="40%" height="24" align="right"> 
		<select id="cId" onclick="getPro()" name="cId">
			<option value="0">……产品类别……</option>
			<c:forEach var="pClass" items="${list}">
				<option value="${pClass.cId}">${pClass.className}</option>
			</c:forEach>
		</select> <select id="pId" style="width: 120px;" name="pId" >
			<option value="0">……产品名称……</option>
		</select>
		<input type="submit" value="搜索" />
                </td>
               </tr>
	</table>
	</form>	
	<table  width="701" height="456" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="8" height="418">			</td>
		<td width="684" height="418" valign="top">
        <div style="color:#826851; line-height:25px; padding-left:12px; padding-right:12px; padding-top:9px;">
          <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
				<c:if test="${empty(lists)}">
						<div>
							<p>没有数据</p>
						</div>
				</c:if>
                  <c:forEach var="proQues" items="${lists}">
                  <tr>
                    <td width="6%" height="24" align="center" ><img src="images/arrow_6.gif" width="11" height="11" /></td>
                    <td width="65%" height="24" style="BORDER-bottom: #999999 1px dotted">
                       <a href="${ctx}/proQues.do?method=findQuesById&id=${proQues.qId}" target="main" onclick="javascript:addHits(${proQues.qId})"> <font color="#000080">${proQues.queContent}</font></a>　</td>
                    <td width="29%" style="BORDER-bottom: #999999 1px dotted">&nbsp;<font color="#999999">
                  [${proQues.createTime}]&nbsp;(点击<font color="#ff0000">${proQues.readNumber}</font>) </font></td>
                  </tr>
                  </c:forEach>    
              </table></td>
            </tr>
          </table>
          <br />
          <!--<dream:page url="${ctx}/proQues.do?method=allProQues&page=" name="pageInfo" styleClass="currentA"/>-->
          
</div></td>
	</tr>
</table>
            </div>
</body>
</html>